﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace fap
{
    /// <summary>
    /// Page1.xaml 的交互逻辑
    /// </summary>
    public partial class 运动控制感应器屏蔽页 : UserControl
    {
        public 运动控制感应器屏蔽页()
        {
            InitializeComponent();
        }



        #region 数据申明

      

        #endregion




    
    

        private void 按钮点击(object sender, RoutedEventArgs e)
        {
            Button button = (Button)sender;
            switch (button.Tag)
            {
        
                case "保存":
                    {
                      
                        break;
                    }
                
               
            }

        }

        private void UserControl_Loaded(object sender, RoutedEventArgs e)
        {
            气缸1原点显示.DataContext = 运动控制数据.屏蔽写入结果[0];
            气缸1到位显示.DataContext = 运动控制数据.屏蔽写入结果[1];
            气缸2原点显示.DataContext = 运动控制数据.屏蔽写入结果[2];
            气缸2到位显示.DataContext = 运动控制数据.屏蔽写入结果[3];
            气缸3原点显示.DataContext = 运动控制数据.屏蔽写入结果[4];
            气缸3到位显示.DataContext = 运动控制数据.屏蔽写入结果[5];
            气缸4原点显示.DataContext = 运动控制数据.屏蔽写入结果[6];
            气缸4到位显示.DataContext = 运动控制数据.屏蔽写入结果[7];
        }

        private void 气缸1原点显示_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            try
            {
                类.结果类 绑定 = ((sender as Label).DataContext as 类.结果类);
                绑定.结果 = !绑定.结果;
                运动控制数据. 屏蔽写入 = true;

            }
            catch { }
        }
    }


}
